package com.info.zhiduoduo.repository.mapper.quota;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.dto.quota.MakerQuotaDto;
import com.info.zhiduoduo.repository.entity.quota.MakerQuota;

import org.apache.ibatis.annotations.Select;

public interface MakerQuotaMapper extends BaseMapper<MakerQuota> {

	@Select("select mq.single_quota,mq.monthly_quota,mq.quarterly_quota,mq.yearly_quota," +
			" ms.userid,ms.quota_flag,ms.twelve_month_quota_flag " +
			" from zdd_maker_studio ms " +
			" left join zdd_maker_quota mq on ms.userid = mq.userid " +
			" where ms.userid = #{userid}")
	MakerQuotaDto getByUserid(Integer userid);

}
